/****************************************************************************
 * Copyright (c) 2023 Qualcomm Technologies International, Ltd.
****************************************************************************/
/**
 *
 * \defgroup ml_modules
 * \file  ml_custom_nn_op.h
 *
 * Public header defining the format for ML custom NN Operator entry
 *
 */

#ifndef ML_CUSTOM_NN_OP_H_
#define ML_CUSTOM_NN_OP_H_

#include "layer_lite_kalimba.h"

#define ML_CUSTOM_NN_OP_ID_PREFIX    0xC000

/** Function pointer prototype of forward function of a custom NN operator */
typedef int (*ml_op_forward_function)(layer_lite *layer);

/** Structure of a custom NN operator table entry */
typedef struct
{
    /** Operator ID. 16 bit value. For custom operator, the two most
     * significant bits should be set.
     */
    uint16 id;

    /** Function pointer of the forward function */
    ml_op_forward_function handler;
} custom_nn_op_lookup_table_entry;

#endif /* ML_CUSTOM_NN_OP_H_ */
